package engine.systems.motion
{
	import ash.core.Component;
	import ash.core.Entity;
	
	import engine.classes.enumerations.Axis;
	import engine.systems.render.render.Render;
	import engine.systems.spatial.spatial.Spatial;
	
	import org.osflash.signals.Signal;
	
	public class MotionTarget extends Component
	{
		public var locked:Boolean = false;
		
		public var spatial:Spatial;
		public var render:Render;
		
		public var useContainer:Boolean = true;
		public var useSpatial:Boolean 	= true;
		
		public var axis:int = Axis.BOTH;
		
		public var offsetX:Number;
		public var offsetY:Number;
		
		public var rate:Number;
		
		public var arrived:Signal = new Signal(Entity);
		public var threshold:int = 10;
		public var atTarget:Boolean = false;
		
		public function MotionTarget(spatial:Spatial = null, render:Render = null, rate:Number = 1, offsetX:Number = 0, offsetY:Number = 0)
		{
			this.spatial = spatial;
			this.render = render;
			
			this.rate = rate;
			
			this.offsetX = offsetX;
			this.offsetY = offsetY;
		}
	}
}